<div class="col-md-12 col-sm-12 col-xs-12">
    <div class="x_panel">
        <div class="x_title">
            <h2>{$pri_name}</h2>
            <div class="clearfix"></div>
        </div>
        <div class="x_content">
            <form class="form-horizontal form-label-left" novalidate action="" id="commentForm" method="post" enctype="multipart/form-data">
                {notempty name="code"}<p><code>备注:</code>{$code}</a></p>{/notempty}
                <!--<span class="section">Personal Info</span>-->
                {:html_select('公司名称','company_id',$info,$company)}
                {:html_select('员工姓名','worker_id',$info,$worker)}
                {:html_text('报单金额','price',$info)}
                {:html_datetime('创建时间','create_time',$info)}
                
                <div class="ln_solid"></div>
                <div class="form-group">
                    <div class="col-md-6 col-md-offset-3">
                        <button id="send" type="submit" class="btn btn-success">提交</button>
                        <div class="btn btn-primary" onclick="history.go(-1)">返回</div>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $('[name="company_id"]').change(function () {
        var company_id = $(this).val();
        $.ajax({
            type: 'POST',
            url: "{:url('api/Worker/all')}",
            data: {company_id: company_id},
            success: function (ret) {
                console.log(ret);
                $('[name="worker_id"]').html('');
                var str = '<option value=""> --请选择员工-- </option>';
                $.each(ret.data,function (k,v) {
                    str += '<option value="'+v['id']+'">'+v['title']+'</option>';
                })
                $('[name="worker_id"]').html(str);
            }
        });
    });
</script>

